﻿<%@ Page Title="" Language="C#" MasterPageFile="~/module/Fontend.Master" AutoEventWireup="true" CodeBehind="Teaching.aspx.cs" Inherits="mamnontuoitho7.module.Teaching" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<div class="orange"><a href="Home.aspx">Trang chủ</a> &raquo; Giảng dạy<%= (_currentSubArticleID != "2") ? " &raquo; " + Session["Common_articleTypeName"] : ""%></div>
    <%
        if(_dt.Rows.Count > 0)
        {
            for (int i = 0; i < _dt.Rows.Count; i++)
            {
                                        %>
    <div class="articles">
        <a href="TeachingDetails.aspx?ArticleID=<%=_dt.Rows[i]["ProductID"].ToString()%>">
        <%if (_dt.Rows[i]["Photo"].ToString() != "")
          { %>
            <img src="../images/article/<%=_dt.Rows[i]["Photo"].ToString() %>" alt="<%=_dt.Rows[i]["Title"].ToString() %>" />
        <%} %>
            <h1 class="h1_orange">
                <%= _general.ReplaceSpecialCharacters(_general.CutString(_dt.Rows[i]["Title"].ToString(), 60))%></h1>
            <h2>
                <span class="postnews">Cập nhật ngày:<%= DateTime.Parse(_dt.Rows[i]["PostDate"].ToString()).ToString("dd/MM/yyyy HH:mm:ss")%></span>
                <span class="view">Lượt xem:<%=_dt.Rows[i]["ViewNumber"].ToString() %></span> <span
                    class="comment">Bình luận:<%= _comment.TotalCommentOfOneProduct(_dt.Rows[i]["ProductID"].ToString()).GetValueOrDefault() %></span></h2>
            <span></span>
            <p>
                <%= _general.ReplaceSpecialCharacters(_general.CutString(_dt.Rows[i]["Introduce"].ToString(), 260))%></p>
        </a>
    </div>
    <%      }
        }
        else
        { %>
        <div class="commingsoon">
            Dữ liệu đang được cập nhật....
        </div>
        <%} %>
   
    <div id="container">
       <div class="pagination">
            <%if (_currentbar > 1)
              { %>
            <a href="Teaching.aspx?a=-1<%= (_currentSubArticleID != "4") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pageorange"><<</a>
            <%} %>
            <%  
                for (int j = _beginPage; j <= _endPage; j++)
                {
                    if (j == _pageflag)
                    {
            
            %>
            <a href="Teaching.aspx?page=<%= j%><%= (_currentSubArticleID != "4") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pageorange active"><%= j%></a>
            <% }else
               { %>
            <a href="Teaching.aspx?page=<%= j%><%= (_currentSubArticleID != "4") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pageorange"><%= j%></a>
            <%  }
             } %>
            <%if (_currentbar < _totalBars)
              { %>
            <a href="Teaching.aspx?a=1<%= (_currentSubArticleID != "4") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pageorange">>></a>
            <%} %>
        </div>
    </div>
</asp:Content>
